Exponential vs. Subexponential Tower of Hanoi Variants
نویسندگان
چکیده
We deal here with Tower of Hanoi variants played on digraphs. A major source for such variants is achieved by adding pegs and/or restricting direct moves between certain pairs of pegs. It is natural to represent a variant of this kind by a directed graph whose vertices are the pegs, and an arc from one vertex to another indicates that it is allowed to move a disk from the former peg to the latter, provided that the usual rules are not violated. We denote the number of pegs by h. For example, the variant with no restrictions on moves is represented by the Complete graph Kh; the variant in which the pegs constitute a cycle and moves are allowed only in one direction is represented by the uni-directional graph Cyclich . For all 3-peg variants, the number of moves grows exponentially fast with n. However, for h ≥ 4 pegs, this is not the case. For example, for Cyclich the number of moves is exponential for any h, while for a path on 4 vertices it is O( √ n3 √ ). This paper characterizes the graphs for which the transfer of a tower of size n of disks from a peg to another requires exponentially many moves as a function of n. To this end we introduce the notion of a shed, as a graph property. A vertex v in a strongly-connected directed graph G = (V, E) is a shed if the subgraph of G induced by V (G) − {v} contains a strongly connected subgraph on 3 or more vertices. Graphs with sheds will be shown to be much more efficient than those without sheds, for the particular domain of the Tower of Hanoi puzzle. Specifically, we show how, given a shed, we can indeed move a tower of disks from any peg to any other within O(λ α ) moves, where λ > 1 and α = 1 2 +o(1). For graphs without a shed, this is impossible. Submitted: March 2014 Reviewed: December 2015 Revised: July 2016 Accepted: August 2016 Final: October 2016 Published: October 2016 Article type: Regular paper Communicated by: M. Kaufmann Research supported in part by the Sapir Academic College, Israel E-mail addresses: [email protected] (Daniel Berend) [email protected] (Amir Sapir) 462 Berend and Sapir Exp. vs. Subexp. Tower of Hanoi Variants
منابع مشابه
Abstracting the Tower of Hanoi
ing the Tower of Hanoi Craig A. Knoblock School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 [email protected] Abstract This paper describes an automated approach to generating abstractions for the Tower of Hanoi and analyzes the use of these abstractions for problem solving. The analysis shows that the learned abstractions produce an exponential reduction in the size of the...
متن کاملExplorations in 4-peg Tower of Hanoi
Finding an optimal solution to the 4-peg version of the classic Tower of Hanoi problem has been an open problem since the 19th century, despite the existence of a presumed-optimal solution. We verify that the presumed-optimal Frame-Stewart algorithm for 4-peg Tower of Hanoi is indeed optimal, for up to 20 discs. We also develop a distributed Tower of Hanoi algorithm, and present 2D and 3D repre...
متن کاملComplexity of the Path Multi-Peg Tower of Hanoi
The Tower of Hanoi problem with h ≥ 4 pegs is long known to require a sub-exponential number of moves in order to transfer a pile of n disks from one peg to another. In this paper we discuss the Pathh variant, where the pegs are placed along a line, and disks can be moved from a peg to its nearest neighbor(s) only. Whereas in the simple variant there are h(h − 1)/2 bi-directional interconnectio...
متن کاملBouncing Towers move faster than Hanoi Towers, but still require exponential time
The problem of the Hanoï Tower is a classic exercise in recursive programming: the solution has a simple recursive definition, and its complexity and the matching lower bound are the solution of a simple recursive function (the solution is so easy that most students memorize it and regurgitate it at exams without truly understanding it). We describe how some very minor changes in the rules of t...
متن کاملThe diameter of Hanoi graphs
Many questions regarding the Tower of Hanoi problem have been posed and answered during the years. Variants of the classical puzzle, such as allowing more than 3 pegs, and imposing limitations on the possible moves among the pegs, raised the analogous questions for those variants. One such question is: given a variant, and a certain number of disks, find a pair of disk arrangements such that th...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Graph Algorithms Appl.
دوره 20 شماره
صفحات -
تاریخ انتشار 2016